Why is my code throwing a NameError for the variable 'a'

welcome to shbcf.ru